package com.zhaojun.cloud.support.shiro;

import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * wwj
 * 2018/12/7  17:03
 */
@Component
public class RedisCacheManager implements CacheManager {

    @Autowired
    private RedisCache redisCache;

    /**
     *  获取缓存的名称 目前只有一个
     */
    @Override
    public <K, V> Cache<K, V> getCache(String name) throws CacheException {
        return redisCache;
    }
}
